﻿#region using
using System;
using PdbRestorer.Engine;
#endregion using

namespace PdbRestorer
{
    class Program
    {
        static void Main(string[] args)
        {
            CommandLineArguments cla=new CommandLineArguments(args);

            string asmFilename,pdbFilename,sourceFilename,lang;
            if (!cla.TryGetValue("a",out asmFilename)||!cla.TryGetValue("p",out pdbFilename)||!cla.TryGetValue("s",out sourceFilename)||!cla.TryGetValue("l",out lang))
                Console.WriteLine("Usage:PdbRestorer /a:assembly-filename /p:pdb-filename /s:source-filename /l:language\r\n\r\nassembly-filename: assembly to debug\r\npdb-filename: where to generate PDB file\r\nsource-filename: where to generate source file\r\nlanguage: generated source file language; C# or IL supported");
            else
                PdbGenerator.Generate(asmFilename,pdbFilename,sourceFilename,lang);
        }
    }
}
